<?php $this->load->view('header');?>

<div class="page-container">
	<?php $this->load->view('sidebar');?>
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">
			<?php $this->load->view('user/_sub_nav');?>
			<div class="row">
				<div class="col-md-12">
					<div class="table-toolbar">
						<a href="user/adminer_add" class="btn btn-success">新增用户</a>
					</div>
					<table class="table table-hover">
						<thead>
							<tr>
								<th>用户名</th>
								<th>昵称</th>
								<th>所属群组</th>
								<th>创建时间</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<?php foreach ($adminers as $key => $adminer):?>
								<tr>
									<td><a href="#" id="adminername" data-type="text" data-pk="<?php echo $adminer['id'];?>"><?php echo $adminer['username'];?></a></td>
									<td><a href="#" id="nickname" data-type="text" data-pk="<?php echo $adminer['id'];?>"><?php echo $adminer['nickname'];?></a></td>
									<td><a href="#" id="group" data-type="select" data-pk="<?php echo $adminer['id'];?>" data-value="<?php echo $adminer['group'];?> " data-source="<?php echo xeditableItem($groups,'id','name');?>"><?php echo $adminer['name'];?></a></td>
									<td><?php echo date('Y-m-d',$adminer['created_on']);?></td>
									<td>使用中</td>
									<td>
										<button class="btn btn-info btn-xs reset_pwd_btn" data-pk="<?php echo $adminer['username'];?>">重置密码 </button>
										<button data-pk="<?php echo $adminer['id'];?>" class="btn btn-danger btn-xs adminer_delete_btn">删除</button>
									</td>
								</tr>
							<?php endforeach;?>
						</tbody>
					</table>

					<div class="modal fade" id="power-modal">
						<div class="modal-dialog">
							<div class="modal-content">
								
							</div><!-- /.modal-content -->
						</div><!-- /.modal-dialog -->
					</div><!-- /.modal -->

				</div>
			</div>
	</div>
</div>

<?php $this->load->view('footer');?>

<!-- Jquery Validate -->
<script type="text/javascript" src="assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
<!-- Jquery Validate -->

<script type="text/javascript" src="assets/plugins/jquery.form.js"></script>

<script type="text/javascript" src="assets/scripts/custom/adminer.js"></script>

<script>
jQuery(document).ready(function() {    
   App.init(); // initlayout and core plugins
   Adminer.init();
});
</script>

</body>
<!-- END BODY -->
</html>
